{extend name="template/base" /}
{block name="content"}
<div class="page-container">
    <form class="mb-20" method="get" action="{:\\think\\Url::build($Request.action)}">
        <input type="text" class="input-text" style="width:250px" placeholder="账号" name="account" value="{$Request.param.account}" />
        状态：
        <div class="select-box" style="width:150px">
            <select name="status" class="select">
                <option value ="">全部</option>
                <option value ="1" {eq name="$Request.param.status" value="1"}selected{/eq}>启用</option>
                <option value ="0" {eq name="$Request.param.status" value="0"}selected{/eq}>禁用</option>
            </select>
        </div>
        <button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
    </form>
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="l">
            <?php if(checkPageAction('admin/Operator/add')){ ?>
                <a class="btn btn-primary radius mr-5" href="javascript:;" onclick="layer_open('添加账号', '{:\\think\\Url::build(\'Operator/add\')}')"><i class="Hui-iconfont">&#xe600;</i>添加</a>
            <?php } ?>
        </span>
        <span class="r pt-5 pr-5">
            共有数据 ：<strong>{$count}</strong> 条
        </span>
    </div>
    <table class="table table-border table-bordered table-hover table-bg mt-20">
        <thead>
        <tr class="text-c">
            <!--<th width="50">{:sort_by('ID','id')}</th>-->
            <th width="50">ID</th>
            <th width="100">账号</th>
            <th width="60">状态</th>
            <th width="150">角色</th>
            <th width="120">邮箱</th>
            <th width="80">手机</th>
            <th width="60">登陆次数</th>
            <th width="120">最后登录时间</th>
            <th width="120">最后登录ip</th>
            <th width="70">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="vo"}
        <tr class="text-c">
            <td>{$vo.id}</td>
            <td>{$vo.account|high_light=$Request.param.account}</td>
            <td>{$vo.status|get_status}</td>
            <td>{eq name="vo.id" value="1"}<b style="color:red;">超级管理员(拥有所有权限)</b>{else/}{notempty name="vo.roles"}[{$vo.roles}]{/notempty}{/eq}</td>
            <td>{$vo.email}</td>
            <td>{$vo.phone}</td>
            <td>{$vo.login_count}</td>
            <td>{$vo.last_login_time}</td>
            <td>{$vo.last_login_ip}</td>
            <td class="f-14">
                <?php if(checkPageAction('admin/Operator/edit')){ ?>
                    <a title="编辑账号" href="javascript:;" onclick="layer_open('编辑账号','{:\\think\\Url::build(\'Operator/edit\',[\'id\'=>$vo.id])}')" style="text-decoration:none" class="ml-5"><i class="Hui-iconfont">&#xe6df;</i></a>
                <?php } ?>
                <?php if(checkPageAction('admin/Operator/delete')){ ?>
                    <a title="删除账号" href="javascript:;" onclick="del_forever(this,'{$vo.id}','{:\\think\\Url::build(\'Operator/delete\')}')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
                <?php } ?>
                <?php if(checkPageAction('admin/Operator/addRoles')){ ?>
                    <a title="授权角色" href="javascript:;" onclick="layer_open('授权角色','{:\\think\\Url::build(\'Operator/addRoles\',[\'id\'=>$vo.id])}')" style="text-decoration:none" class="label radius ml-5 label-primary">授权角色</a>
                <?php } ?>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page-bootstrap">{$page}</div>
</div>
{/block}